package com.itheima.apitest.integertest;
//String转Int，int转String
public class IntegerDemo {
    public static void main(String[] args) {
        //int 转 String
        //1.
        int i = 100;
        String s1 = i + "";
        System.out.println(s1);
        //2.
        String s2 = String.valueOf(i);
        System.out.println(s2);

        //String 转 int
        //1.
        String s3 = "100";
        Integer i1 = Integer.valueOf(s3);
        int i2 = i1.intValue();
        System.out.println(i2);
        //2.
        int i3 = Integer.parseInt(s3);
        System.out.println(i3);
    }
}
